Optimal. Leaf size=38 \[ -a \log \left (1-a^2 x^2\right )+a^2 (-x) \tanh ^{-1}(a x)+a \log (x)-\frac{\tanh ^{-1}(a x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0511531, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {6014, 5916, 266, 36, 29, 31, 5910, 260} \[ -a \log \left (1-a^2 x^2\right )+a^2 (-x) \tanh ^{-1}(a x)+a \log (x)-\frac{\tanh ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6014
Rule 5916
Rule 266
Rule 36
Rule 29
Rule 31
Rule 5910
Rule 260
Rubi steps
\begin{align*} \int \frac{\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{x^2} \, dx &=-\left (a^2 \int \tanh ^{-1}(a x) \, dx\right )+\int \frac{\tanh ^{-1}(a x)}{x^2} \, dx\\ &=-\frac{\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \int \frac{1}{x \left (1-a^2 x^2\right )} \, dx+a^3 \int \frac{x}{1-a^2 x^2} \, dx\\ &=-\frac{\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)-\frac{1}{2} a \log \left (1-a^2 x^2\right )+\frac{1}{2} a \operatorname{Subst}\left (\int \frac{1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)-\frac{1}{2} a \log \left (1-a^2 x^2\right )+\frac{1}{2} a \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )+\frac{1}{2} a^3 \operatorname{Subst}\left (\int \frac{1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac{\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \log (x)-a \log \left (1-a^2 x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0097317, size = 38, normalized size = 1. \[ -a \log \left (1-a^2 x^2\right )+a^2 (-x) \tanh ^{-1}(a x)+a \log (x)-\frac{\tanh ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 45, normalized size = 1.2 \begin{align*} -{a}^{2}x{\it Artanh} \left ( ax \right ) -{\frac{{\it Artanh} \left ( ax \right ) }{x}}-a\ln \left ( ax-1 \right ) +a\ln \left ( ax \right ) -a\ln \left ( ax+1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.94342, size = 49, normalized size = 1.29 \begin{align*} -a{\left (\log \left (a x + 1\right ) + \log \left (a x - 1\right ) - \log \left (x\right )\right )} -{\left (a^{2} x + \frac{1}{x}\right )} \operatorname{artanh}\left (a x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.23007, size = 122, normalized size = 3.21 \begin{align*} -\frac{2 \, a x \log \left (a^{2} x^{2} - 1\right ) - 2 \, a x \log \left (x\right ) +{\left (a^{2} x^{2} + 1\right )} \log \left (-\frac{a x + 1}{a x - 1}\right )}{2 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.23114, size = 41, normalized size = 1.08 \begin{align*} \begin{cases} - a^{2} x \operatorname{atanh}{\left (a x \right )} + a \log{\left (x \right )} - 2 a \log{\left (x - \frac{1}{a} \right )} - 2 a \operatorname{atanh}{\left (a x \right )} - \frac{\operatorname{atanh}{\left (a x \right )}}{x} & \text{for}\: a \neq 0 \\0 & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15541, size = 65, normalized size = 1.71 \begin{align*} \frac{1}{2} \, a \log \left (x^{2}\right ) - \frac{1}{2} \,{\left (a^{2} x + \frac{1}{x}\right )} \log \left (-\frac{a x + 1}{a x - 1}\right ) - a \log \left ({\left | a^{2} x^{2} - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]